﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LogicUniversityBiz;

namespace LogicUniversity.Department_Head
{
    public partial class RequestsDetail : System.Web.UI.Page
    {

        protected void Page_PreInit(Object sender, EventArgs e)
        {
            //if (Session["Role"] as string != "Employee" || Session["Role"] as string != "Representative")
            //{
            //    
            //}
            if (Session["Role"] as string != "Department Head")
            {
                if ((Session["TempRole"] as string).Trim() != "Department Head")
                {
                    Response.Redirect("~/Login.aspx");
                }
            }

        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int reqID=Convert.ToInt32(Request.QueryString["ReqID"]as string);
                CoreHeadFascade fs = new CoreHeadFascade();
                RequestsDetailView.DataSource = fs.getEmployeeRequestsDetails(reqID);
                RequestsDetailView.DataBind();
            }
        }
    }
}